{include file="public/head" /}
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a><cite>后台管理</cite></a>
        <a><cite>物业管理系统</cite></a>
        <a><cite>小区直付通信息</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
       <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so"  method="get" action="#">
          <input class="layui-input" placeholder="物业名称" name="property_name" id="property_name" {if isset($property_name)}value="{$property_name}"{/if}>
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock>
        <button class="layui-btn layui-btn-danger" onclick="x_admin_show('添加','{:url('add')}',600,600)"><i class="layui-icon"></i>添加</button>
        <span class="x-right" style="line-height:40px">共有数据：{$number} 条</span>
      </xblock>
      <table class="layui-table" id="table">
        <thead  style="text-align:center;">
          <tr>
            <th style="text-align: center; font-size: 16px;">收款唯一商户id</th>
            <th style="text-align: center; font-size: 16px;">姓名</th>
            <th style="text-align: center; font-size: 16px;">收款到账名称</th>
            <th style="text-align: center; font-size: 16px;">收款签约支付宝</th>
            <th style="text-align: center; font-size: 16px;">收款类型配置</th>
            <th style="text-align: center; font-size: 16px;">支付开关</th>
            <th style="text-align: center; font-size: 16px;">添加时间</th>
            <th style="text-align: center; font-size: 16px;">操作</th>
          </tr>
        </thead>
        <tbody style="text-align:center;">
            {foreach $list as $lis}
            <tr>
              <td style="text-align: center;">{$lis.id}</td>
              <td style="text-align: center;">{$lis.name}</td>
              <td style="text-align: center;">{$lis.gate_name}</td>
              <td style="text-align: center;">{$lis.binding_alipay_logon_id}</td>
               <td style="text-align: center;">二维码/小程序</td>
              <td>
                {if $lis.pay_status=="0"}
                <span style="color:red">关闭</span>
                {/if}
                {if $lis.pay_status!="0"}
                开启
                {/if}
              </td>
              <td style="text-align: center;">{$lis.create_time}</td>
              <td class="td-manage" style="text-align: center;">

                <a onclick="payurl('{$lis.id}')" title="缴费链接" href="javascript:;">
                  <i class="layui-icon">&#xe628; </i>
                </a>
                
                <a title="修改"  onclick="x_admin_show('配置','{:url(\'edit\')}?id={$lis.id}',550,500)" href="javascript:;">
                    <i class="layui-icon">&#xe60f;</i>
                </a>
              </td>
            </tr>
            {/foreach}
        </tbody>
      </table>
      <div class="page">
        <div id="page">
            {$gatelist->render()|raw}
        </div>
      </div>

    </div>
    <script>
      function payurl(id){
        layer.open({
          type: 1,
          skin: 'x-right', //样式类名
          closeBtn: 0, //不显示关闭按钮
          anim: 2,
          shadeClose: true, //开启遮罩关闭
          area: ['80%', '300px'],
          content:
                  '<div style="padding: 20px 100px; font-size:18px">'+
                  '支付宝直面付缴费：https://www.zaozaopay.com/zftpay/gate/info?id='+ id + '<br><br>'+
                  '支付宝直面付缴费：https://www.zaozaopay.com/zftpay/wap/pay?id='+ id + '<br><br>'+
                  '支付宝小程序缴费：alipays://platformapi/startapp?appId=2021001164679293&page=%2Fpages%2Fzft%2Fpay?id='+ id + '<br><br>'+

                  '</div>'
        });
      }
      layui.use('laydate', function(){
        var laydate = layui.laydate;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });


    </script>

    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>

  </body>

</html>